import React from 'react'
import {useEffect,useState} from "react"
import * as action from "../action/index.js"
import {useDispatch,useSelector} from "react-redux"
function Pull() {
    const dispatch = useDispatch()

    const store = useSelector((state)=>{
        return {
            ...state.tablereducer
        }
    })
    useEffect(()=>{
        dispatch(action.getlist())
    },[])
  return (
    <div>
        {
            store.arr.list && store.arr.list.length ?  store.arr.map((item,index)=>{
                return <div key={index}>{item.tit}</div>
            }):""
        }
    </div>
  )
}

export default Pull